package com.itheima.tlias.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Slf4j
@RestController
@RequestMapping("/cookie")
public class CookieController {
    @GetMapping("/request")
    public void request(HttpServletResponse response) {
        /*response.addCookie(new Cookie("name", "张三"));*/
    }

    @GetMapping("/response")
    public void response(HttpServletRequest request) {
      /*  Cookie[] cookies = request.getCookies();
        for (Cookie cookie : cookies) {
            log.info(cookie.getName());
            log.info(cookie.getValue());
        }*/
    }
}
